﻿@inherits Blazorise.BarDropdownMenu
@if ( ParentBar?.Mode == BarMode.Horizontal )
{
    <div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes" @onmouseenter="@ParentBarDropdown.OnMouseEnterHandler" @onmouseleave="@ParentBarDropdown.OnMouseLeaveHandler" data-visible="@VisibleString">
        <ul class="py-1 text-sm text-gray-700 dark:text-gray-400">
            @ChildContent
        </ul>
    </div>
}
else
{
    <div class="@ContainerClassNames">
        <div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes" @onmouseenter="@ParentBarDropdown.OnMouseEnterHandler" @onmouseleave="@ParentBarDropdown.OnMouseLeaveHandler" data-visible="@VisibleString">
            @ChildContent
        </div>
    </div>
}
@code {
    /// <summary>
    /// Gets or sets the reference to the parent <see cref="Bar"/> component.
    /// </summary>
    [CascadingParameter] protected Bar ParentBar { get; set; }
}